<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>人员审批</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<!--标准mui.css-->
		<link rel="stylesheet" href="static/admin/css/mui.min.css">
		<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
		<!--App自定义的css-->
		<link rel="stylesheet" type="text/css" href="static/admin/css/app.css"/>
		<style>
			.mui-card .mui-control-content {
				padding: 10px;
			}
			.mui-control-content {
				height: 150px;
			}
			.mui-toast-container {bottom: 50% !important;}
        </style>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav">
			<!-- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a> -->
			<h1 class="mui-title">我的审批</h1>
		</header>
		<div class="mui-content new-min-quan">
            <ul>
				{if isset($list)}
				{foreach $list as $lis}
					<li>
						<div class="left">
						<div class="rtdian"></div><div class="rbdian"></div>
						<div class="padding">
							<!-- <img src="static/admin/images/logo.jpg"> -->
							<div class="tit" style="width:240px;">
									{if $lis.relation == 1}
									业主
									{elseif $lis.relation == 2}
									家人
									{elseif $lis.relation == 3}
									租客
									{elseif $lis.relation == 4}
									访客
									{/if}
									<p>手机号：{$lis.phone}</p>
									<p>{$lis.in_time} — {$lis.out_time}</p></div>
						</div>
						</div>
						<div class="right bg2">
							<div class="ltdian"></div>
							<div class="lbdian"></div>
							<div class="padding">
								<div class="btn"><button class="used"><a title="通过" onclick="personnelAllow('{$lis.id}', 'A{$lis.id}')" href="javascript:;" id="A{$lis.id}">通过</a></button></div>
								<br>
								<div class="btn"><button class="use"><a title="删除" onclick="personnelDel('{$lis.id}', 'D{$lis.id}')" href="javascript:;" id="D{$lis.id}">删除</a></button></div>
							</div>
						</div>

					</li>
				{/foreach}
				{else}
					暂无审批
				{/if}
            </ul>
		</div>
		<script>
				//通过
				function personnelAllow(id, doc){
					if(confirm('身份已核实吗?确定要通过吗？')) 
					{ 
					var url = "{:url('admin/Apiuser/personnelresult')}?id=" + id + "&type=1"
					// console.log(url)
					$('#' + doc).attr('href', url)
					} 
					return false; 
				} 
			
				//删除
				function personnelDel(id, doc){
					if(confirm('身份已核实吗?确定要删除吗?')) 
					{ 
					var url = "{:url('admin/Apiuser/personnelresult')}?id=" + id + "&type=2"
					// console.log(url)
					$('#' + doc).attr('href', url)
					} 
					return false; 
				} 
			</script>
	</body>

</html>